package com.qf.sclg.controller;

import com.qf.sclg.dao.OrderDao;
import com.qf.sclg.entity.Order;
import com.qf.sclg.result.ResponseData;
import com.qf.sclg.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiOperation;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * (Order)表控制层
 *
 * @author makejava
 * @since 2021-10-11 16:32:25
 */
@Api("预约记录的接口")
@RestController
@RequestMapping("order")
public class OrderController {
    /**
     * 服务对象
     */
    @Resource
    private OrderService orderService;
    @Resource
    private OrderDao orderDao;

    @ApiOperation(value = "通过id查找预约记录")
    @ApiImplicitParam(name = "id", value = "预约记录的Id")
    @GetMapping("/query/{id}")
    public ResponseData queryId(@PathVariable("id") Integer id) {
        Order order = orderDao.queryById(id);
        return new ResponseData(order);
    }

}

